import java.util.Arrays;
import java.util.Scanner;

public class test {
    public static boolean judge(int[] arr) {
        for (int i = 0; i < arr.length - 2; i++) {
            if ((arr[i] % 2 != 0) && (arr[i + 1] % 2 != 0) && (arr[i + 2] % 2 != 0)){
                return true;
            }
        }
        return false;
    }
    public static void main(String[] args) {
        int[] arr = {1, 2, 34, 3, 4, 5, 7, 23, 12};
        System.out.println(judge(arr));
    }

    public static void bubble_Sort(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = 0; j < arr.length - 1 - i; j++) {
                if (arr[j] > arr[j + 1]) {
                    int tmp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = tmp;
                }
            }
        }
    }

    public static void main7(String[] args) {
        int[] arr = {9, 5, 1, 9, 6, 4, 9, 9, 9};
        bubble_Sort(arr);
        if (arr.length % 2 == 0) {
            System.out.println(arr[(arr.length) / 2 - 1]);
        } else {
            System.out.println(arr[(arr.length) / 2]);
        }
    }

    public static void main6(String[] args) {
        int[] arr = {5, 6, 1, 5, 6, 1, 2};
        int tmp = arr[0];
        for (int i = 1; i < arr.length; i++) {
            tmp ^= arr[i];
        }
        System.out.println(tmp);
    }

    /* public static int[] find(int[] arr, int target){
         for(int i = 0; i < arr.length; i++) {
             for (int j = i + 1; j < arr.length; j++) {
                 if ((arr[i] + arr[j] == target) && (arr[i] != arr[j])) {
                    return new int[]{i, j};
                 }
             }
         }
         return null;
     }*/
    /*public static void main5(String[] args) {
        int[] nums = {5, 1, 9, 7, 8, 2, 4, 3, 6, 10};
        System.out.println("请输入目标值:");
        Scanner scanner = new Scanner(System.in);
        int target = scanner.nextInt();
        int[] ans = find(nums, target);
        System.out.println(Arrays.toString(ans));
    }*/
    public static void main4(String[] args) {
        int[] arr = {5, 1, 9, 7, 8, 2, 4, 3, 6, 10};
        System.out.println(Arrays.toString(arr));
        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = 0; j < arr.length - 1 - i; j++) {
                if (arr[j] > arr[j + 1]) {
                    int tmp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = tmp;
                }
            }
        }
        System.out.println("冒泡排序后的数组为:");
        System.out.println(Arrays.toString(arr));
    }

    /*public static void main3(String[] args) {
        int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();
        int num = find(arr,x);
        if(num >= 0){
            System.out.println("数据存在，下标为"+num);
        }else{
            System.out.println("要查找的数据不存在");
        }
    }*/
   /* //public static int find(int[] arr,int x){
        int left = 0;
        int right = arr.length - 1;
        while(right >= left){
            int cur = (left + right) / 2;
            if(arr[cur] == x){
                return cur;
            }
            else if(arr[cur] > x) {
                right = cur - 1;
            }
            else if(arr[cur] < x) {
                left = cur - 1;
            }
        }
        return -1;
    }*/
    public static void sort(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = 0; j < arr.length - i - 1; j++) {
                if (arr[j] % 2 == 0) {
                    int tmp = arr[j];
                    arr[j] = arr[j + 1];
                    arr[j + 1] = tmp;
                }
            }
        }
    }

    public static void main2(String[] args) {
        //调整数组顺序使得奇数位于偶数之前。调整之后，不关心大小顺序
        //如数组：[1,2,3,4,5,6]
        //调整后可能是：[1, 5, 3, 4, 2, 6]
        int[] arr = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
        sort(arr);
        System.out.println(Arrays.toString(arr));
    }

    public static int[] transform(int[] arr) {
        int[] ret = new int[arr.length];
        for (int i = 0; i <= arr.length - 1; i++) {
            ret[i] = arr[i] * 2;
        }
        return ret;
    }

    public static void main1(String[] args) {
        int[] arr = {1, 2, 3, 4, 5};
        int[] tmp = transform(arr);
        System.out.println(Arrays.toString(arr));
        System.out.println(Arrays.toString(tmp));
    }
}